feat(dotAI): Dot AI LangChain4J - Google Vertex#35241
feat(dotAI): Dot AI LangChain4J - Google Vertex#35241ihoffmann-dot wants to merge 12 commits intodot-ai-langchain-amazon-bedrockfrom
Conversation
|
Claude finished @ihoffmann-dot's task in 2m 43s —— View job PR Review: feat(dotAI) - Google Vertex AI
Findings1. Missing
The case "openai":
requireNonBlank(config.model(), "model", modelType);
validateOpenAi(config, modelType);The 2. Inverted condition is hard to follow — if (!"chat".equals(modelType)) {
return vertexAiFn.apply(config); // skips validation; fn throws UnsupportedOperationException
}
validateVertexAi(config, modelType);
return vertexAiFn.apply(config);The comment says "Throw 3. No tests for
4.
5. Summary: Issue 1 (missing model validation) is the only substantive bug — it will surface as a confusing runtime failure rather than a clean validation error. Issues 2 and 3 are minor readability/coverage gaps. |
Summary
Adds Google Vertex AI (Gemini) as a supported chat provider.
Auth is handled via Application Default Credentials — no API key required.
langchain4j-vertex-ai-geminidependency (with enforcer exclusions)vertex_aicase toLangChain4jModelFactoryswitchbuildVertexAiChatModelusingVertexAiGeminiChatModelbuildVertexAiEmbeddingModelandbuildVertexAiImageModelthrowUnsupportedOperationExceptionLangChain4jModelFactoryTestConfiguration
{ "chat": { "provider": "vertex_ai", "projectId": "my-gcp-project", "location": "us-central1", "model": "gemini-1.5-pro", "maxTokens": 8192, "temperature": 1.0 } }Notes
gcloud auth application-default loginor a service account attached to the instance).UnsupportedOperationException.org.checkerframework:checker-qual,com.google.android:annotations) are explicitly excluded from thelangchain4j-vertex-ai-geminidependency.Related Issue
This PR fixes #35183
EPIC: dotAI Multi-Provider Support #33970